#ifndef P_BASE_MATERIAL_SYSTEM_H
#define P_BASE_MATERIAL_SYSTEM_H

#include "PMaterialSystem.h"
#include "ECS/System/PSystem.h"
#include "ECS/Component/Material/PBaseMaterialComponent.h"
#include "ECS/Component/PTransformComponent.h"
#include "Render/PiccoloRenderContext.h"

namespace Piccolo
{
    class PiccoloVKPipelineLayout;
    class PiccoloVKPipeline;

    struct PushConstant
    {
        glm::mat4 matrix{ 1.f };
        uint32_t colorType;
    };

    class PBaseMaterialSystem : public PMaterialSystem
    {
    public:
        void OnInit(PiccoloVKRenderPass *renderPass) override;
        void OnRender(VkCommandBuffer cmdBuffer, PiccoloRenderTarget *renderTarget) override;
        void OnDestroy() override;

    private:
        std::shared_ptr<PiccoloVKPipelineLayout> mPipelineLayout;
        std::shared_ptr<PiccoloVKPipeline> mPipeline;
    };
}

#endif